package com.quanyan.club.mapper;

import com.quanyan.club.entity.vo.resp.task.ActivitySignUpInfo;
import com.quanyan.club.entity.vo.resp.task.TaskActivityInfo;
import com.quanyan.club.entity.vo.resp.task.TaskInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created by zhuo.shi on 2016/12/13.
 */
public interface ClubEggTaskMapper {

    Integer calculateAlreadyGiveOutEggsOfClub(@Param("taskId") int taskId);

    List<TaskInfo> selectClubTaskList(@Param("clubId") int clubId, @Param("sundayEnd") Date sundayEnd, @Param("start") int start, @Param("pageSize") int pageSize);

    Integer countClubTaskList(@Param("clubId") int clubId,  @Param("sundayEnd") Date sundayEnd);

    List<TaskActivityInfo> selectClubTaskActivityList(@Param("clubId") int clubId,
                                                      @Param("startTime") Date weekOfMondayBegin, @Param("endTime") Date weekOfSundayEnd);

    Integer calculateSignupCount(@Param("clubId") int clubId, @Param("activityId") int activityId);

    List<Integer> selectSettleClubs(@Param("startTime") Date start, @Param("endTime") Date end);

    List<ActivitySignUpInfo> getClubActivitySignUpInfo(@Param("clubId") int clubId, @Param("minOrderAmount") double minOrderAmount, @Param("activityId") int activityId);

    List<Integer> getClubTaskId(@Param("taskType") int taskType, @Param("clubType") int clubType);
}
